package cn.me.alphamq.nameserver.event.model.service;

import cn.me.alphamq.common.entity.req.PullBrokerAddressReq;
import cn.me.alphamq.common.event.model.Event;

/**
 * 拉取 broker 的地址的事件
 *
 * @author f
 */
public class PullBrokerAddressEvent extends Event {

    /**
     * 待拉取的 broker 的角色
     */
    private String role;

    /**
     * broker 的组名
     */
    private String brokerGroup;

    public PullBrokerAddressEvent() {
    }

    public PullBrokerAddressEvent(PullBrokerAddressReq pullBrokerAddressReq) {
        super(pullBrokerAddressReq.getMsgId());
        this.role = pullBrokerAddressReq.getRole();
        this.brokerGroup = pullBrokerAddressReq.getBrokerGroup();
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getBrokerGroup() {
        return brokerGroup;
    }

    public void setBrokerGroup(String brokerGroup) {
        this.brokerGroup = brokerGroup;
    }
}
